using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Bussiness.Config;     
using Bussiness.Entity;
namespace Bussiness.ManagerBase
{
                

     public abstract class CmsCategoryInfosManagerBase
    {
        public CmsCategoryInfosManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity Insert(CmsCategoryInfosEntity obj)
        { 
            return (CmsCategoryInfosEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity Update(CmsCategoryInfosEntity obj)
        { 
            return (CmsCategoryInfosEntity)Adapter.Update(obj);             
        }
 
 
        public CmsCategoryInfosEntity Delete(CmsCategoryInfosEntity obj)
        { 
            return (CmsCategoryInfosEntity)Adapter.Delete(obj);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity DeleteByCategoryId (CmsCategoryInfosEntity obj)
        { 
            return (CmsCategoryInfosEntity)Adapter.DeleteByField(obj,"CategoryId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CategoryId 
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity DeleteByCategoryId (Guid CategoryId )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CategoryId = CategoryId;  
            return (CmsCategoryInfosEntity)Adapter.DeleteByField(obj,"CategoryId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CatName duoc set trong object
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity DeleteByCatName (CmsCategoryInfosEntity obj)
        { 
            return (CmsCategoryInfosEntity)Adapter.DeleteByField(obj,"CatName");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CatName 
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity DeleteByCatName (string CatName )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CatName = CatName;  
            return (CmsCategoryInfosEntity)Adapter.DeleteByField(obj,"CatName");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity DeleteById (CmsCategoryInfosEntity obj)
        { 
            return (CmsCategoryInfosEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id 
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity DeleteById (Guid Id )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Id = Id;  
            return (CmsCategoryInfosEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Lang duoc set trong object
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity DeleteByLang (CmsCategoryInfosEntity obj)
        { 
            return (CmsCategoryInfosEntity)Adapter.DeleteByField(obj,"Lang");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Lang 
        /// </summary>
        /// <returns>CmsCategoryInfosEntity</returns>
        public CmsCategoryInfosEntity DeleteByLang (string Lang )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Lang = Lang;  
            return (CmsCategoryInfosEntity)Adapter.DeleteByField(obj,"Lang");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public CmsCategoryInfosEntity Select(CmsCategoryInfosEntity obj)
        { 
            return (CmsCategoryInfosEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(CmsCategoryInfosEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(CmsCategoryInfosEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new CmsCategoryInfosEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new CmsCategoryInfosEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<CmsCategoryInfosEntity> SelectAllLST()
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new CmsCategoryInfosEntity()),new CmsCategoryInfosEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<CmsCategoryInfosEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new CmsCategoryInfosEntity(),option),new CmsCategoryInfosEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (CmsCategoryInfosEntity obj)
        { 
            return Adapter.SelectByField(obj,"CategoryId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (CmsCategoryInfosEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CategoryId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectByCategoryIdLST (CmsCategoryInfosEntity obj)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId"),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectByCategoryIdLST (CmsCategoryInfosEntity obj,SelectOptions option)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CategoryId",option),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Guid CategoryId )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CategoryId = CategoryId;  
            return Adapter.SelectByField(obj,"CategoryId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Guid CategoryId, SelectOptions option)
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CategoryId = CategoryId;  
            return Adapter.SelectByField(obj,"CategoryId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsCategoryInfosEntity> SelectByCategoryIdLST (Guid CategoryId )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CategoryId = CategoryId;  
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId"),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsCategoryInfosEntity> SelectByCategoryIdLST (Guid CategoryId, SelectOptions option)
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CategoryId = CategoryId;  
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId",option),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CatName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCatName (CmsCategoryInfosEntity obj)
        { 
            return Adapter.SelectByField(obj,"CatName");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CatName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCatName (CmsCategoryInfosEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CatName",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CatName duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectByCatNameLST (CmsCategoryInfosEntity obj)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CatName"),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CatName duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectByCatNameLST (CmsCategoryInfosEntity obj,SelectOptions option)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CatName",option),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CatName 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCatName (string CatName )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CatName = CatName;  
            return Adapter.SelectByField(obj,"CatName");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CatName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCatName (string CatName, SelectOptions option)
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CatName = CatName;  
            return Adapter.SelectByField(obj,"CatName",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CatName 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsCategoryInfosEntity> SelectByCatNameLST (string CatName )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CatName = CatName;  
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CatName"),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CatName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsCategoryInfosEntity> SelectByCatNameLST (string CatName, SelectOptions option)
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.CatName = CatName;  
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CatName",option),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (CmsCategoryInfosEntity obj)
        { 
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (CmsCategoryInfosEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectByIdLST (CmsCategoryInfosEntity obj)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectByIdLST (CmsCategoryInfosEntity obj,SelectOptions option)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Id",option),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id, SelectOptions option)
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsCategoryInfosEntity> SelectByIdLST (Guid Id )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Id = Id;  
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsCategoryInfosEntity> SelectByIdLST (Guid Id, SelectOptions option)
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Id = Id;  
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id",option),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Lang duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLang (CmsCategoryInfosEntity obj)
        { 
            return Adapter.SelectByField(obj,"Lang");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Lang duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLang (CmsCategoryInfosEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Lang",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Lang duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectByLangLST (CmsCategoryInfosEntity obj)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Lang"),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Lang duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectByLangLST (CmsCategoryInfosEntity obj,SelectOptions option)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Lang",option),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Lang 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLang (string Lang )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Lang = Lang;  
            return Adapter.SelectByField(obj,"Lang");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Lang duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLang (string Lang, SelectOptions option)
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Lang = Lang;  
            return Adapter.SelectByField(obj,"Lang",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Lang 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsCategoryInfosEntity> SelectByLangLST (string Lang )
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Lang = Lang;  
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Lang"),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Lang duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsCategoryInfosEntity> SelectByLangLST (string Lang, SelectOptions option)
        { 
            CmsCategoryInfosEntity obj = new CmsCategoryInfosEntity();
            obj.Lang = Lang;  
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Lang",option),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectWithConditionLST (CmsCategoryInfosEntity obj)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new CmsCategoryInfosEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<CmsCategoryInfosEntity></returns>
        public List<CmsCategoryInfosEntity> SelectWithConditionLST (CmsCategoryInfosEntity obj,SelectOptions option)
        { 
            return  (List<CmsCategoryInfosEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new CmsCategoryInfosEntity());
        }

}
}
